<table cellpadding="0" cellspacing="0" class="bought-table">
    <colgroup>
        <col width="%">
        <col width="%">
        <col width="%">
        <col width="%">
        <col width="%">
        <col width="">
        <col>
        <col>
    </colgroup>
    <thead>
        <tr class="col-name">
            <th>会员名</th>
            <th>类型</th>
            <th>店铺名</th>
            <th>所在地</th>
            <th>信誉等级</th>
            <th>qq号码</th>
            <th>
                <select name="credit" id="J_Integrity" onChange="sendto('service', this.value);">
                    <option value="0" <?php if(isset($_REQUEST['service']) && $_REQUEST['service'] == 0)echo "selected"?>>服务</option>
                    <option value="1" <?php if(isset($_REQUEST['service']) && $_REQUEST['service'] == 1)echo "selected"?>>诚信保证</option>
                    <option value="2" <?php if(isset($_REQUEST['service']) && $_REQUEST['service'] == 2)echo "selected"?>>优质店</option>
                </select>
            </th>
            <th>操作</th>
        </tr>
    </thead>
    <?php
    if (isset($shops['items'])):
        foreach ($shops['items'] as $item):
            $item['zpoint_credit'] = $item['point_credit'];
            $item['point_credit'] = cal_grade($item['point_credit']);
            $item['point_credit_pre'] = ceil($item['point_credit'] / 5);
            $item['point_credit_pre_val'] = $item['point_credit'] % 5;
            if ($item['point_credit_pre_val'] == 0) {
                $item['point_credit_pre_val'] = 5;
            }
            ?>
            <tbody class="combo-order">
                <tr class="sep-row">
                    <td colspan="8"></td>
                </tr>
                <tr class="order-bd">
                    <td title="<?php echo $item['userid'] ?>"> <?php echo $item['userid'] ?></td>
                    <td>花店</td>
                    <td>
                        <a href="http://shop.huaji.com/shop.php?shop_id=<?php echo $item['uniqueid'] ?> " target="_blank"><?php echo $item['floristname'] ?></a>
                    </td>
                    <td><?php echo $regions[$item['province']] ?>|<?php echo $regions[$item['city']] ?></td>
                    <td><img title="信誉积分：<?php echo $item['zpoint_credit'] ?>，近90天增长：<?php echo $item['point_credit_90'] ?>" src="<?php echo JD_RESOURCE_URL; ?>/images/level<?php echo $item['point_credit_pre'] ?>-<?php echo $item['point_credit_pre_val'] ?>.gif" /></td>
                    <td>
                        <a target="blank"  href="tencent://message/?uin=<?php echo $item['florist_im'] ?>&Site=您好！&Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:<?php echo $item['florist_im'] ?>:16" alt="点击这里给我发消息"></a>
                    </td>
                    <td>
                        <?php echo ($item['sponsion'] == '0' ? '' : '<img src="' . JD_RESOURCE_URL . '/images/chengxin.png" title="诚信保证计划" />' ) . (($item['excellent_flag'] == 1) ? '<img src="' . JD_RESOURCE_URL . '/images/you_icon.png" title="花集网优质服务示范花店" />' : '') ?> 
                    </td>
                    <td><a href="javascript:;" href="#" onclick="javascript:selectFloristShop(this);" class="florist" floristId="<?php echo $item['uniqueid'] ?>" floristname="<?php echo $item['floristname'] ?>" userName="<?php echo $item['userid'] ?>" floristAdd ="<?php echo $item['address'] ?>">选择此店</a></td>
                </tr>
            </tbody>
        <?php endforeach; ?>
        <tfoot>
            <tr class="sep-row">
                <td colspan="8"></td>
            </tr>
            <?php
            $tpages = ceil($pg['total_result'] / $pg['pagesize']);
            $page_no = isset($_REQUEST['shopPage']) && intval($_REQUEST['shopPage']) ? intval($_REQUEST['shopPage']) : 1;
            if ($pg['total_result'] < 10)
                $tpages = $page_no;
            $ppage = $page_no - 1;
            if ($ppage < 1)
                $ppage = 1;
            $npage = $page_no + 1;
            if ($npage > $tpages)
                $npage = $tpages;
            $spage = $page_no - 3;
            if ($spage < 1)
                $spage = 1;
            $epage = $page_no + 3;
            if ($epage > $tpages)
                $epage = $tpages;
            ?>
            <tr class="toolbar">
                <td colspan="8">
                    <ul class="page-nav">
                        <li class="prev-page"> <a href="javascript:jumpto(<?php echo $ppage ?>)"><span class="paginator-arrow paginator-arrow-left-orange"></span></a></li>
                        <?php
                        for ($i = $spage; $i <= $epage; $i++) {
                            if ($i == $page_no)
                                echo ' <li class="curr-page"><a class="selected J_MakePoint" href="#">' . $i . '</a></li>';
                            else
                                echo '<li><a href="javascript:jumpto(' . $i . ')">' . $i . '</a></li>';
                        }
                        ?>

                        <li class="next-page"> <a href="javascript:jumpto(<?php echo $npage ?>)"> <span class="paginator-arrow paginator-arrow-right-orange"></span></a></li><li> <span>共 <?php echo $tpages ?> 页 &nbsp;</span> </li>
                        <li> 
                            <span>到第
                            <input id="J_PageNum" type="text" name="J_PageNum" size="2" maxlengh="4" onKeyUp="this.value = this.value.replace(/\D/g, 1)">
                            <span>页</span>
                            <input id="J_JumpTo" type="button" value="确定" class="basicBtn" onClick="jumpto(J_PageNum.value)">
                            </span> 
                        </li>
                    </ul>
                </td>
            </tr>
        </tfoot>
<?php else: ?>
        <tbody class="combo-order">
            <tr class="sep-row">
                <td colspan="8"></td>
            </tr>
            <tr class="order-bd">
                <td colspan="8">找不到记录,请筛选后再处理!</td></tr>
            </tfoot>
<?php endif; ?>
</table>